package gui;

import java.awt.Font;
import java.awt.FontFormatException;
import java.io.File;
import java.io.IOException;


public class Theme {
	
	public static final int SMALL_SIZE = 3;
	public static final int NORMAL_SIZE = 5;
	
	public static final String NORMAL_FACE = "Segoe UI Light";
	public static final String EMPHASIZED_FACE = "Segoe UI";
	public static final String TYPEWRITER_FACE = "Dejavu Sans Mono";
	
	public static final Font FONT_AWESOME = createFontAwesome();
	
	
	private static Font createFontAwesome() {
		try {
			return Font.createFont(
					Font.TRUETYPE_FONT, 
					new File("lib/font-awesome-4.2.0/fonts/fontawesome-webfont.ttf")
					).deriveFont(Font.PLAIN, 24f);
		} catch (FontFormatException | IOException e) {
			e.printStackTrace();
		}
		
		return null;
	}
	
	
	public static String normalText(String text) {
		return fontText(text, NORMAL_FACE, SMALL_SIZE);
	}
	
	public static String emphasizedText(String text) {
		return fontText(text, EMPHASIZED_FACE, NORMAL_SIZE);
	}
	
	public static String typewriterText(String text) {
		return fontText(text, TYPEWRITER_FACE, NORMAL_SIZE);
	}
	
	public static String fontText(String text, String face, int size) {
		return "<html><font face=\""+face+"\" size="+size+">"
				+ text
				+ "</font></html>";
	}
	

}
